package com.sky.mapper;

import org.apache.ibatis.annotations.MapKey;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public interface ReportMapper {
    /**
     * 查询营业额
     * @param map
     * @return
     */
    BigDecimal queryTurnoverByLocalDateTimeAndStatus(Map<String, Object> map);

    /**
     * 查询用户数
     * @param map
     * @return
     */
    Integer queryUserNumber(Map<String, Object> map);

    /**
     * 订单统计接口
     * @param map
     * @return
     */
    Integer queryOrderNumber(Map<String, Object> map);

    /**
     * 查询top10的销量
     *
     * @param begin
     * @param end
     * @param status
     * @return
     */
    @MapKey("name")
    List<Map> queryOrderTop10(LocalDateTime begin, LocalDateTime end, Integer status);
}
